// input

<template>
    <van-field v-model="model.value"
               :required="typeItem.required == 1"
               :rules="[{'required': (typeItem.required == 1)}]"
               :label="typeItem.surveyName"
               :disabled="disabled"
               placeholder="请输入"
               @blur="emitBlur">
    </van-field>
</template>

<script>
import mixins from './mixins'

export default {
    mixins: [mixins],
    methods: {
        emitBlur () {
            this.model.riskListId || (this.model.riskListId = this.riskListId)
            this.model.surveyTypeId || (this.model.surveyTypeId = this.typeItem.surveyTypeId)
            this.model.filedType || (this.model.filedType = this.typeItem.filedType)
            this.model.surveyName || (this.model.surveyName = this.typeItem.surveyName)

            // valueList中没有值的话 push
            if (!this.valueList.some(item => item.surveyTypeId == this.typeItem.surveyTypeId)) {
                this.valueList.push(this.model)
            }
        }
    }
}
</script>